﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MapLibrary.Particles.Emitters
{
    /// <summary>
    /// This is an emitter that releases particles whenever Trigger() is called.
    /// The idea is a certain even will cause the triggering of the emitter.  For
    /// example, perhaps you want to emit particles whenever a certain Sprite dies.
    /// That Sprite will control the emitter, and will trigger it upon death.
    /// </summary>
    public abstract class TriggeredParticleEmitter
    {
        protected ParticleManager particleManager;

        public TriggeredParticleEmitter(ParticleManager pManager)
        {
            particleManager = pManager;
        }

        public void Trigger()
        {
            Emit();
        }

        /// <summary>
        /// Send the particle(s) out into the world.
        /// </summary>
        protected abstract void Emit();
    }
}
